package org.lanlab.storode.common;

/**
 * @author dove
 * @since 2020/1/9 14:37
 */
public enum ResponseCode {
    // return when all encountered no error
    SUCCESS(200, "Operation Successfully"),
    FAILED(500, "Operation Failed"),
    // return when unknown errors encountered
    UNKNOWN(-1, "Unknown Error Encountered");

    private final int code;
    private final String message;

    ResponseCode(int code, String message) {
        this.code = code;
        this.message = message;
    }

    public int getCode() {
        return code;
    }

    public String getMessage() {
        return message;
    }
}
